<?php
/*!
 * LostKids API PHP Library v0.1 
 * http://huali.li/
 *
 * Copyright 2011, 
 * Written By James Pang
 *  
 * Date: 2011/2/14
 */

/**
 * kids register facade.
 */
interface Register
{
    /**
     * register new img faces from the msgs.
     * 
     * 1, recognize from existing faces
     * 2, if not match, register as new kid, and reply
     * 3, else reply msg with matching photos
     * 
     * @param WeiboMessage|MessageBatch $msg, msg to register
     * @param int $userId, register to this uId, create new user if null
     */
    public function registerFaces($msg);

    /**
     * register new user with faces
     */
    public function registerUser($msg);

    /**
     * matched new img faces from the msgs to an EXISTING userId.
     * 
     * @param WeiboMessage|MessageBatch $msg, msg to match to existing uid
     */
    public function matchFaces($msg);

    /**
     * confirm a kid found from lost and report set. so the kid index need to
     * be excluded from later matching.
     * 
     * @param WeiboMessage|MessageBatch $msg, msg to confirm to existing uid,
     * which means kid found!
     */
    public function confirmFound($msg, $userId);
}
?>
